package com.he.DesignPatterns.strategy.demo2;

/**
 * @description: 测试不同的策略，即选择不同的活动
 * @Author: HCL
 * @Date: 2024/9/3 14:44
 */
public class Client {

    public static void main(String[] args) {
        SaleMan saleMan = new SaleMan(new StrateryA());
        saleMan.salesManShow();

//        System.out.println("==============");
//        saleMan.setStratety(new StrateryB());
//        saleMan.salesManShow();

        System.out.println("==============");
        SaleMan saleManA = new SaleMan(new StrateryA());//会创建新的对象
        System.out.println(saleMan == saleManA);
    }
}
